package com.study.spaoplog.controller;

import com.study.spaoplog.service.QpsService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author MI
 * @version 1.0
 * @date 2021/6/20 20:38
 * @Des https://blog.csdn.net/weixin_44801979/article/details/117415662
 * Redis实现 主流的四种限流策略
 */
@Slf4j
@Api(tags = "qps")
@RestController
@RequestMapping("/qps")
public class QpsController {

    @Autowired
    public QpsService qpsService;

    @RequestMapping(value = "/startLoutong", method = RequestMethod.GET)
    public Map<String, Object> startLoutong(@RequestParam Map<String, Object> paramMap) {
        return qpsService.startLoutong(paramMap);
    }

}
